package com.springboot.example.monitor.web;

import com.springboot.example.monitor.domain.db.User;
import com.springboot.example.monitor.mapper.UserMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * 作者: guo yao
 * 日期: 2016年02月25日
 * 时间: 下午13:42
 */

@Controller
@RequestMapping("/index")
public class IndexController {

    private static Logger log = LoggerFactory.getLogger(IndexController.class);

    @Resource
    private UserMapper userMapper;

    @RequestMapping("/")
    public String indexMain() {
        return "index";
    }

    @RequestMapping("/main.html")
    public String main() {
        System.out.println("方法");
        System.out.println("=====方法======");
        System.out.println("=====方法======");
        System.out.println("======方法=====");
        log.trace("======trace");
        log.debug("======debug");
        log.info("======info");
        log.warn("======warn");
        log.error("======error");
        System.out.println(userMapper.select(new User()));
        return null;
    }
}
